﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace SystemHYS.Infrstructre.Migrations
{
    /// <inheritdoc />
    public partial class 原料质检 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "RawmaterialtestingGualityProject",
                columns: table => new
                {
                    RawmaterialtestingGualityProjectId = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    RawMaterialtestingId = table.Column<int>(type: "integer", nullable: false),
                    gualityProjectId = table.Column<int>(type: "integer", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RawmaterialtestingGualityProject", x => x.RawmaterialtestingGualityProjectId);
                });

            migrationBuilder.CreateTable(
                name: "Rawmaterialtestings",
                columns: table => new
                {
                    RawMaterialtestingId = table.Column<int>(type: "integer", nullable: false)
                        .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
                    qualityNumber = table.Column<string>(type: "text", nullable: true),
                    qualityName = table.Column<string>(type: "text", nullable: true),
                    qualityDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    qualityPerson = table.Column<string>(type: "text", nullable: true),
                    vendor = table.Column<string>(type: "text", nullable: true),
                    ingredientNumber = table.Column<string>(type: "text", nullable: true),
                    ingredientName = table.Column<string>(type: "text", nullable: true),
                    unit = table.Column<string>(type: "text", nullable: true),
                    specification = table.Column<string>(type: "text", nullable: true),
                    rawMaterialBatchNumber = table.Column<string>(type: "text", nullable: true),
                    size = table.Column<string>(type: "text", nullable: true),
                    typeOfQC = table.Column<string>(type: "text", nullable: true),
                    gualitySchemeName = table.Column<string>(type: "text", nullable: true),
                    state = table.Column<bool>(type: "boolean", nullable: true),
                    AddName = table.Column<string>(type: "text", nullable: true),
                    AddTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    UpdateName = table.Column<string>(type: "text", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
                    DelectName = table.Column<string>(type: "text", nullable: true),
                    DelectTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Rawmaterialtestings", x => x.RawMaterialtestingId);
                });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "RawmaterialtestingGualityProject");

            migrationBuilder.DropTable(
                name: "Rawmaterialtestings");
        }
    }
}
